package com.it.plic;

import java.io.IOException;
import java.net.*;

/**
 * @author げっしょく
 * @date 2021/8/8
 */
public class Demo1 {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        String s = "你是一个大傻逼";
        byte[] bytes = s.getBytes();
        InetAddress ab = InetAddress.getByName("127.0.0.1");
        DatagramPacket dp = new DatagramPacket(bytes, bytes.length, ab, 10001);
        ds.send(dp);
        ds.close();
    }
}
